-- GENERATED SPELL FOR [Oronu the Elder] --


function spell0_21663(pUnit, Event) --@Grounding Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(34079,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_21663', 1, 1)
end

function spell1_21663(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_21663', 3000, 1)
end

function spell2_21663(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21663', 0, 1)
end

function Sorts_21663(pUnit, Event)
local choix_sorts_21663 = math.random(0, 2)
if choix_sorts_21663 == 0 then
pUnit:RegisterEvent('spell0_21663', 1, 1)
end
if choix_sorts_21663 == 1 then
pUnit:RegisterEvent('spell1_21663', 1, 1)
end
if choix_sorts_21663 == 2 then
pUnit:RegisterEvent('spell2_21663', 1, 1)
end
end

function mob21663_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21663', math.random(1500, 3000), 1)
end

function mob21663_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21663_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21663_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21663, 1, 'mob21663_Action')
RegisterUnitEvent(21663, 2, 'mob21663_Leave')
RegisterUnitEvent(21663, 3, 'mob21663_Kill')
RegisterUnitEvent(21663, 4, 'mob21663_Die')
